package com.cw.action.panel;

import java.awt.Color;

import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import com.cw.maintenance.AddDataDialog;
import com.cw.po.Lottery;

public class LtCheckPanel extends CheckPanel {

	public LtCheckPanel(AddDataDialog parent, Lottery lottery) {
		super(parent, lottery);
		setDialogSize(1000, 250);
		gridLayout1.setColumns(19);
		gridLayout1.setHgap(1);
	}

	@Override
	void createRowPanel(int row) {
		int redNum = lottery.getNum();
		for (int j = 0; j < redNum; j++) {
			JLabel labelred = new JLabel("red " + String.valueOf(j + 1));
			labelred.setHorizontalAlignment(SwingConstants.RIGHT);
			labelred.setForeground(Color.RED);
			add(labelred);
			cpball[row * col + j] = new JComboBox(DATA);
			add(cpball[row * col + j]);
			cpball[row * col + j].setEnabled(false);
		}
		for(int i=0;i<lottery.getSpecialnum();i++){
			JLabel labelblue = new JLabel("blue ");
			labelblue.setForeground(Color.BLUE);
			labelblue.setHorizontalAlignment(SwingConstants.RIGHT);
			add(labelblue);
			cpball[row * col + redNum+i] = new JComboBox(specialData);
			add(cpball[row * col + redNum+i]);
			cpball[row * col + redNum+i].setEnabled(false);			
		}

	}

}
